Skip to content

Conversation

@rdhyee
Copy link
Contributor

@rdhyee rdhyee commented Nov 1, 2025

Problem

Color-code button has rendering issues on production site:

  • Button renders as black box (no visible text)
  • Code block shows despite echo: false and echo: fenced directives
  • Observable Inputs.button() widget doesn't render properly in Quarto

Solution

Replace Inputs.button() with Observable html template literal:

  • Creates button using html template with inline styling
  • Implements viewof + CustomEvent pattern for Observable reactivity
  • Maintains compatibility with existing classification handler

Testing

✅ Tested locally with Playwright MCP:

  • Button renders with proper blue styling
  • Click event triggers classification handler
  • Console shows "Classifying dots by type..."
  • No black box or unwanted code visibility

Changes

  • tutorials/parquet_cesium.qmd (lines 50-70): Button implementation
    • Replaced Inputs.button() with html template
    • Added viewof classifyTrigger with custom onclick
    • Aliased as classifyDots for handler compatibility

Deployment

Ready to merge and deploy to https://isamples.org/tutorials/parquet_cesium.html

🤖 Generated with Claude Code

Replace Inputs.button() with html template literal to fix rendering issues:
- Button was showing as black box
- Code block visible despite echo directives

Solution uses viewof + CustomEvent pattern for Observable reactivity.
Button now renders properly and triggers classification handler.

Tested locally - button displays correctly and functions as expected.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@rdhyee rdhyee merged commit 1da00ff into isamplesorg:main Nov 1, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant